home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
tpxtable
/
pxtdemo.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-04-08
|
4KB
|
168 lines
unit Pxtdemo;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, Grids, DBGrids, ExtCtrls, DBCtrls, StdCtrls, DB,
DBTables, DBIProcs, DBITypes, DBIErrs, Pxtable;
type
TParadoxDemoForm = class(TForm)
GroupBox1: TGroupBox;
DBNavigator1: TDBNavigator;
DBGrid1: TDBGrid;
GroupBox2: TGroupBox;
DBNavigator2: TDBNavigator;
DBGrid2: TDBGrid;
GroupBox3: TGroupBox;
DBNavigator3: TDBNavigator;
DBGrid3: TDBGrid;
GroupBox4: TGroupBox;
DBNavigator4: TDBNavigator;
DBGrid4: TDBGrid;
GroupBox5: TGroupBox;
DBNavigator5: TDBNavigator;
DBGrid5: TDBGrid;
GroupBox6: TGroupBox;
DBNavigator6: TDBNavigator;
DBGrid6: TDBGrid;
GroupBox7: TGroupBox;
DBNavigator7: TDBNavigator;
DBGrid7: TDBGrid;
MasterTable: TPXTable;
MasterSource: TDataSource;
DetailTable1: TPXTable;
DetailSource1: TDataSource;
DetailTable2: TPXTable;
DetailSource2: TDataSource;
SubDetail11Source: TDataSource;
SubDetail12Table: TPXTable;
SubDetail12Source: TDataSource;
SubDetail21Table: TPXTable;
SubDetail22Table: TPXTable;
SubDetail21Source: TDataSource;
SubDetail22Source: TDataSource;
Detail2CheckBox: TCheckBox;
Detail1CheckBox: TCheckBox;
Detail11CheckBox: TCheckBox;
Detail12CheckBox: TCheckBox;
Detail21CheckBox: TCheckBox;
Detail22CheckBox: TCheckBox;
SubDetail11Table: TPXTable;
Button1: TButton;
Image1: TImage;
procedure Detail1CheckBoxClick(Sender: TObject);
procedure Detail11CheckBoxClick(Sender: TObject);
procedure Detail12CheckBoxClick(Sender: TObject);
procedure Detail2CheckBoxClick(Sender: TObject);
procedure Detail21CheckBoxClick(Sender: TObject);
procedure Detail22CheckBoxClick(Sender: TObject);
Procedure RefreshDetailTables(DataSet: TDataset);
Procedure RefreshSubDetailTables1(DataSet: TDataset);
Procedure RefreshSubDetailTables2(DataSet: TDataset);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ParadoxDemoForm: TParadoxDemoForm;
implementation
{$R *.DFM}
procedure TParadoxDemoForm.Detail1CheckBoxClick(Sender: TObject);
begin
If Detail1CheckBox.State = cbChecked
Then
DetailTable1.MasterSource := Nil
Else
DetailTable1.MasterSource := MasterSource;
DetailTable1.Refresh;
end;
procedure TParadoxDemoForm.Detail11CheckBoxClick(Sender: TObject);
begin
If Detail11CheckBox.State = cbChecked
Then
SubDetail11Table.MasterSource := Nil
Else
SubDetail11Table.MasterSource := DetailSource1;
SubDetail11Table.Refresh;
end;
procedure TParadoxDemoForm.Detail12CheckBoxClick(Sender: TObject);
begin
If Detail12CheckBox.State = cbChecked
Then
SubDetail12Table.MasterSource := Nil
Else
SubDetail12Table.MasterSource := DetailSource1;
SubDetail12Table.Refresh;
end;
procedure TParadoxDemoForm.Detail2CheckBoxClick(Sender: TObject);
begin
If Detail2CheckBox.State = cbChecked
Then
DetailTable2.MasterSource := Nil
Else
DetailTable2.MasterSource := MasterSource;
DetailTable2.Refresh;
end;
procedure TParadoxDemoForm.Detail21CheckBoxClick(Sender: TObject);
begin
If Detail21CheckBox.State = cbChecked
Then
SubDetail21Table.MasterSource := Nil
Else
SubDetail21Table.MasterSource := DetailSource2;
SubDetail21Table.Refresh;
end;
procedure TParadoxDemoForm.Detail22CheckBoxClick(Sender: TObject);
begin
If Detail22CheckBox.State = cbChecked
Then
SubDetail22Table.MasterSource := Nil
Else
SubDetail22Table.MasterSource := DetailSource2;
SubDetail22Table.Refresh;
end;
Procedure TParadoxDemoForm.RefreshDetailTables(DataSet: TDataset);
Begin
DetailTable1.Refresh;
DetailTable2.Refresh;
RefreshSubDetailTables1(DataSet);
RefreshSubDetailTables2(DataSet);
End;
Procedure TParadoxDemoForm.RefreshSubDetailTables1(DataSet: TDataset);
Begin
SubDetail11Table.Refresh;
SubDetail12Table.Refresh;
End;
Procedure TParadoxDemoForm.RefreshSubDetailTables2(DataSet: TDataset);
Begin
SubDetail21Table.Refresh;
SubDetail22Table.Refresh;
End;
procedure TParadoxDemoForm.Button1Click(Sender: TObject);
begin
Close;
end;
end.